import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';
import { HttpModule, JsonpModule } from '@angular/http';

import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { LoginPage } from '../pages/login/login';
import { BuildPage } from '../pages/build/build';
import { RoomPage } from '../pages/room/room';
import { RoomDetailPage } from '../pages/roomDetail/roomDetail';
import { HistoryPage } from '../pages/history/history';
import { HistoryDetailPage } from '../pages/historyDetail/historyDetail';
import { SettlementPage } from '../pages/settlement/settlement';
import { SettlementDetailPage } from '../pages/settlementDetail/settlementDetail';
import { SetCheckInPage } from  '../pages/setCheckIn/setCheckIn';
import { SetCheckOutPage } from  '../pages/setCheckOut/setCheckOut';
import { RegisterPage } from '../pages/register/register';
import { ForgotPasswordPage } from '../pages/forgotPassword/forgotPassword';

import { HttpService } from "../providers/HttpService";
import { StorageService } from "../providers/StorageService";

@NgModule({
  declarations: [
    MyApp,
    HomePage,
    LoginPage,
    BuildPage,
    RoomPage,
    RoomDetailPage,
    HistoryPage,
    HistoryDetailPage,
    SettlementPage,
    SettlementDetailPage,
    SetCheckInPage,
    SetCheckOutPage,
    RegisterPage,
    ForgotPasswordPage
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp),
    HttpModule,
    JsonpModule
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    HomePage,
    LoginPage,
    BuildPage,
    RoomPage,
    RoomDetailPage,
    HistoryPage,
    HistoryDetailPage,
    SettlementPage,
    SettlementDetailPage,
    SetCheckInPage,
    SetCheckOutPage,
    RegisterPage,
    ForgotPasswordPage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    HttpService,
    StorageService
  ]
})
export class AppModule {}
